package com.itdachang.design.creatation.factory.factorymethod;

/**
 * @author gcq
 * @Create 2022-02-07
 */
public class MainTest {
    public static void main(String[] args) {
        WuLincMiniCarFactory wuLincMiniCarFactory = new WuLincMiniCarFactory();
        MiniCar miniCar = (MiniCar) wuLincMiniCarFactory.newCar();
        miniCar.run();

        WuLincVanCarFactory wuLincVanCarFactory = new WuLincVanCarFactory();
        VanCar vanCar = (VanCar) wuLincVanCarFactory.newCar();
        vanCar.run();


        WuLinRacingCarFactory wuLinRacingCarFactory = new WuLinRacingCarFactory();
        RacingCar racingCar = (RacingCar) wuLinRacingCarFactory.newCar();
        racingCar.run();
    }
}